import request from '@/utils/request'

// 查询MailOrder列表
export function listOrder(query) {
  return request({
    url: '/mail/order/list',
    method: 'get',
    params: query
  })
}
export function listAccountOrder(query) {
  return request({
    url: '/mail/order/listAccount',
    method: 'get',
    params: query
  })
}
// 查询MailOrder列表
export function listOrderOtp(query) {
  return request({
    url: '/mail/order/listOrderOtp',
    method: 'get',
    params: query
  })
}
// 查询MailOrder列表
export function rentOrder(query) {
  return request({
    url: '/mail/order/rent',
    method: 'get',
    params: query
  })
}// 查询MailOrder列表
export function rentMail(query) {
  return request({
    url: '/mail/order/rentMail',
    method: 'get',
    params: query
  })
}

// 查询MailOrder详细
export function getOrder(id) {
  return request({
    url: '/mail/order/' + id,
    method: 'get'
  })
}

export function getOrderOtp(query) {
  return request({
    url: '/mail/order/mailOtp',
    method: 'get',
    params: query
  })
}

// 新增MailOrder
export function addOrder(data) {
  return request({
    url: '/mail/order',
    method: 'post',
    data: data
  })
}

// 修改MailOrder
export function updateOrder(data) {
  return request({
    url: '/mail/order',
    method: 'put',
    data: data
  })
}

// 删除MailOrder
export function delOrder(id) {
  return request({
    url: '/mail/order/' + id,
    method: 'delete'
  })
}

// 导出MailOrder
export function exportOrder(query) {
  return request({
    url: '/mail/order/export',
    method: 'get',
    params: query
  })
}


// opt history
export function optHistorys(query) {
  return request({
    url: '/mail/otphistory/list',
    method: 'get',
    params: query
  })
}

// number request
export function numberRequests(query) {
  return request({
    url: '/mail/otpstat/getByOrderId',
    method: 'get',
    params: query
  })
}

// number request
export function getFiftyList() {
  return request({
    url: '/mail/order/listFifty',
    method: 'get',
    params: {}
  })
}
